<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<jsp:include page="head.jsp" />
<link href="skin/user.css" rel="stylesheet" type="text/css" />

 <script type="text/javascript">  
    function changeValidateCode(obj) {  
           //获取当前的时间作为参数，无具体意义  
        var timenow = new Date().getTime();  
           //每次请求需要一个不同的参数，否则可能会返回同样的验证码  
        //这和浏览器的缓存机制有关系，也可以把页面设置为不缓存，这样就不用这个参数了。  
        obj.src="imagecode.action?d="+timenow;  
    }  
</script> 
<!--头结束-->
<div id="user">
	<div class="upassport">
		<div class="top1">
			<span>欢迎加入天歌网，请注册</span>或
			<a href="login.jsp">登录</a>
		</div>
		<div class="main">
			<div class="main_left">
				<s:form action="register!register.action" method="post" name="formUser"
					onsubmit="return register(); " theme="simple" namespace="/">
					<table>
						<tr>
							<th>
								Email：
							</th>
							<td>
							   <s:textfield name="member.email" id="email" cssClass="inp_text"/>
								<span id="email_notice"><s:fielderror cssStyle="color:red;font-size: 12px"><s:param>emailError</s:param></s:fielderror></span>
							</td>
						</tr>
						<tr>
							<th>
								用户名：
							</th>
							<td>
							    <s:textfield name="member.loginName" id="username" cssClass="inp_text"/>
								<span id="username_notice" >4-16个字符，一个汉字为两个字符<s:fielderror cssStyle="color:red;font-size: 12px"><s:param>loginNameError</s:param></s:fielderror></span>
							</td>
						</tr>
						<tr>
							<th>
								密码：
							</th>
							<td>
								<s:password name="member.password" id="password1" cssClass="inp_text"/>
								<span id="password_notice">最少4个字符<s:fielderror cssStyle="color:red;font-size: 12px"><s:param>passwordError</s:param></s:fielderror></span>
							</td>
						</tr>
						<tr>
							<th>
								确认密码：
							</th>
							<td>
								<s:password name="confirmPassword" id="conform_password" cssClass="inp_text"/>
								<span id="conform_password_notice"><s:fielderror cssStyle="color:red;font-size: 12px"><s:param>confirmPasswordError</s:param></s:fielderror></span>
							</td>
						</tr>
						<tr>
							<th>
								验证码：
							</th>
							<td>
								<input type="text" name="captcha" class="inp_text_2" />
								<img src="imagecode.action" alt="captcha"
									style="vertical-align: middle; cursor: pointer;"
									onclick="changeValidateCode(this)" alt="更换图片"/>
								<span ><s:fielderror cssStyle="color:red;font-size: 12px"><s:param>captchaError</s:param></s:fielderror></span>
							
							</td>
						</tr>
						<tr>
							<th></th>
							<td>
								<label>
									<input name="agreement" type="checkbox" value="1"
										checked="checked" />
									我已看过并接受
									<a href="#">《天歌网用户协议》</a>
								</label>
							</td>
						</tr>
						<tr>
							<th></th>
							<td>
								<input name="act" type="hidden" value="act_register">
									<input type="hidden" name="back_act" value="" />
									<input name="Submit" type="submit" value="确认注册"
										class="us_Submit">
							</td>
						</tr>
					</table>
				</s:form>
			</div>
			<div class="main_right">
				<div class="main_right_top">
					<span>您已有亲亲账户？请直接登录</span>
					<a href="login.jsp">登录天歌网</a>
				</div>
				<div class="main_right_bottom">
					<span>您也可以使用合作网站账户登录</span>
					<p class="con">
						<a href="#"><img src="images/q2.png" /> </a><a href="#"><img
								src="images/q1.png" /> </a><a href="#"><img src="images/q3.png" />
						</a><a href="#"><img src="images/q4.png" /> </a><a href="#"><img
								src="images/q5.png" /> </a>
					</p>
				</div>
			</div>
			<div class="cle"></div>
		</div>
	</div>
	<div class="blank"></div>
</div>
<!--主体结束-->
<jsp:include page="foot.jsp" />
<!-- 结束-->
</body>
</html>
